import fetch from '@/utils/fetch'

//获取员工信息列表
export function getStaffList(params) {
	return fetch({
	    url: `/uc/v1/mgt/staff`,
	    method: 'get',
	    params
  	})
}

//获取员工详细数据
export function getStaffDetail(id) {
	return fetch({
	    url: `/uc/v1/mgt/staff/${id}`,
	    method: 'get'
  	})
}

export function createStaff(data) {
	return fetch({
		url: '/uc/v1/mgt/staff',
		method: 'post',
		data
	})
}

export function modifyStaff(id, data) {
	return fetch({
	    url: `/uc/v1/mgt/staff/${id}`,
	    method: 'patch',
	    data
	})
}

//删除员工
export function deleteStaff(user_id){
	return fetch({
		url:`/uc/v1/mgt/staff/${user_id}`,
		method: 'delete'
	})
}

//根据关键字查询账户信息
export function getUserInfo(params){
	return fetch({
		url:"/uc/v1/user/info",
		method:"get",
		params
	})
}